// import './utils/http'
Page({
  data: {
    avatar: '',
    name: '',
    number: '',
    phone: ''
  },
  onLoad() {
    this.getUserInfo()
    this.getTaskList()
  },
  async getTaskList() {
    wx.http.get('/driver/users/taskReport', {
      month: 7,
      year: 2023
    })
    wx.$toast('获取本月任务!!!')
  },
  async getUserInfo() {
    const res = await wx.http.get('/driver/users')
    console.log(res);
    this.setData({
      ...res.data.data
    })
  },
  goCarInfo() {
    console.log(1);
    wx.navigateTo({
      url: '/subpkg_my/pages/carInfo/carInfo',
    })
  },
  goJobData() {
    console.log(1);
    wx.navigateTo({
      url: '/subpkg_my/pages/jobData/jobData',
    })
  },
  goSystemSetting() {
    wx.navigateTo({
      url: '/subpkg_my/pages/systemSettings/systemSettings',
    })
  }
})